<?php

	session_start();
	if($_SESSION["username"] == "")
	{
		header("location:login.php");
		exit();
	}

	include 'connectDB.php';

	$strSQL = "SELECT * FROM tbl_user WHERE username = '".$_SESSION["username"]."'  ";
	$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
	$objResult = mysql_fetch_array($objQuery);
?>
<html>
<head>
<title>Dashboard</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="header">
	<div class="logo"><a href="index.php" style="color: black;">Machine Online</a></div>
	<div class="user" >Hi !	 <?=$objResult["username"];?><br><a href="logout.php" name="logout" id="logout" />logout</a></div>
</div>
<div id="container">
	<div class="menu-dash">
		<img src="image/shop.png" width="140" height="150"/><br>
		<a href="merchant_ajax.php"> Merchant Manage</a>
	</div>
	<div class="menu-dash">
	    <img src="image/spoon.png" width="150" height="150"/><br />
	    <a href="Item.php"> Item Manage</a>
		</div>
	
</div>
</body>
</html>
